#include "shmem.h"

static struct shm_param para;

struct shm_data
{
    char data[68];
};

int write_shm(char *data){
    int ret=1;

    ret =shm_init(&para,"TCP_MYQTT",1024);
    if(ret<0)
    {
        return -1;
    }

    struct shm_data *addr=(struct shm_data*)shm_getaddr(&para);
    if(addr==NULL)
    {
        return -1;
    }

    strcpy(addr->data,data);

    return 0;
}